package com.company.structural.decorator_pattern.concrete_decotatot;

import com.company.structural.decorator_pattern.component.Component;
import com.company.structural.decorator_pattern.decorator.ComponentDectorator;

/**
 * 黑色边框
 * @ClassName BlackBorderDecorator
 * @Author tiezheng.han
 * @Date 2020/8/31 16:32
 **/
public class BlackBorderDecorator extends ComponentDectorator {
    /**
     * 注入抽象对象构件类型的对象
     *
     * @param component
     */
    public BlackBorderDecorator(Component component) {
        super(component);
    }

    @Override
    public void display() {
        this.setBlackBorder();
        super.display();
    }

    public void setBlackBorder(){
        System.out.println("为构件加黑色边框");
    }
}
